<?php
$a=array(111,"222",'name'=>'张三','age'=>18,1000=>333,"444", );
for($i=0; $i<6; ++$i){ //for循环无法正确显示数组中各个元素的值
    echo $i,'. ', $a[$i],"\n";
}
//使用foreach来遍历数组元素
echo "显示数组各个元素key及value的值\n";
foreach($a as $k=>$v){
    echo $k,': ', $v,"\n";
}
echo "仅仅显示value的值：\n";
foreach($a as $value){
    echo $value,"\n";
}